<?php
//排序和查找
@require_once("toubu.php");
$key=$_GET["key"];
$orderby=$_GET["orderby"];
$paixu=$_GET["paixu"];
$sql="SELECT * from gucciinfo WHERE goodsname LIKE '%$key%' ORDER BY $orderby $paixu ";
$result=mysql_query($sql);
$obj=array();
while($data=mysql_fetch_array($result)){
    $list=array();
    $list['goodsname']= $data['goodsname'];
    $list['goodsnum']= $data['goodsnum'];
    $list['goodsimg']= $data['goodsimg'];
    $list['goodsprice']= $data['goodsprice'];
    $list['id']= $data['id'];
    $obj[]=$list;
}
echo json_encode($obj);


